<?php
global $smarty;

$thisPage = "discount";

TemplateHelper::useLayout("default", true);

addDataService("getcompanies");
addDataService("sendmail");
addDataservice("filtergroup");
addDataService("getcountries");

function buildLayout($smarty) {
    $smarty->assign("default", array(
        content => getContent($smarty),
        contexthelp => getContextHelp($smarty),
    ));
}

function executeService($serviceName, $params) {
}

function getContent($smarty) {
    global $thisPage;
    $smarty->assign("day", date("Y-m-d"));    
    $smarty->assign("discount100", generateCodeFor(100));
    $smarty->assign("discount50", generateCodeFor(50));
    $smarty->assign("discount40", generateCodeFor(40));
    $smarty->assign("discount30", generateCodeFor(30));
    $smarty->assign("discount20", generateCodeFor(20));
    $smarty->assign("discount10", generateCodeFor(10));
    return $smarty->fetch(TemplateHelper::getTemplateFile($thisPage, "content", true));
}

function getContextHelp($smarty) {
    global $thisPage;
    return $smarty->fetch(TemplateHelper::getTemplateFile($thisPage, "contexthelp", true));
}

function getPageHeader() {
}

function getPageFooter() {
}

?>
